#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

void Bubbsort(int* p, int a) 
 {
	for(int j = 0;j < a - 1;j++)
	{
		int count = 0;
		for (int i = 0; i < a - 1 -j; i++)
		{
			int tmp = 0;
			if (p[i] > p[i+1])
			{
				tmp = p[i];
				p[i] = p[i + 1];
				p[i + 1] = tmp;
				count++;
			}
		}
		if (!count) {
			break;
		}
	}
}

int main(){
	int arr[10] = { 0 };
	int* p = &arr[0];
	for (int i = 0; i < 10; i++) {
		scanf("%d", p + i);
	}
	Bubbsort(p, 10);
	for (int i = 0; i < 10; i++){
		printf("%d ", *(p+i));
	}
}